﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <link type="text/css" rel="stylesheet" media="all" href="../styles/global.css" />
        <link type="text/css" rel="stylesheet" media="all" href="../styles/global_color.css" />
    </head>
    <body>
        <!--Logo区域开始-->
        <div id="header">
            <img src="../images/logo.png" alt="logo" class="left"/>
            <a href="/logout">[退出]</a>
        </div>
        <!--Logo区域结束-->
        <!--导航区域开始-->
        <div id="navi">
            <ul id="menu">
                <li><a href="/index" class="index_on"></a></li>
                <li><a href="/rolelist" class="role_off"></a></li>
                <li><a href="/adminList" class="admin_off"></a></li>
                <li><a href="/feelist" class="fee_off"></a></li>
                <li><a href="/accountlist" class="account_off"></a></li>
                <li><a href="/servicelist" class="service_off"></a></li>
                <li><a href="/billList" class="bill_off"></a></li>
                <li><a href="/reportList" class="report_off"></a></li>
                <li><a href="/userInfo" class="information_off"></a></li>
                <li><a href="/userModiPwd" class="password_off"></a></li>
            </ul>
        </div>
        <!--导航区域结束-->
        <!--主要区域开始-->
        <div id="main">            
            <form action="" method="" class="main_form">
                <!--必填项-->
                <div class="text_info clearfix"><span>业务账号ID：</span></div>
                <div class="input_info"><input type="text" id="serviceId" readonly class="readonly"/></div>
                <div class="text_info clearfix"><span>账务账号ID：</span></div>
                <div class="input_info"><input type="text" id="accountId" readonly class="readonly"/></div>
                <div class="text_info clearfix"><span>客户姓名：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="realName"/></div>
                <div class="text_info clearfix"><span>身份证号码：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="idcardNo"/></div>
                <div class="text_info clearfix"><span>服务器 IP：</span></div>
                <div class="input_info"><input type="text" id="unixHost" readonly class="readonly"/></div>
                <div class="text_info clearfix"><span>OS 账号：</span></div>
                <div class="input_info"><input type="text" id="osUsername" readonly class="readonly"/></div>
                <div class="text_info clearfix"><span>状态：</span></div>
                <div class="input_info">
                    <select disabled id="statu">
                    </select>                        
                </div>
                <div class="text_info clearfix"><span>开通时间：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="createDate"/></div>
                <div class="text_info clearfix"><span>资费 ID：</span></div>
                <div class="input_info"><input type="text" class="readonly" readonly id="costId"/></div>
                <div class="text_info clearfix"><span>资费名称：</span></div>
                <div class="input_info"><input type="text" readonly class="width200 readonly" id="name"/></div>
                <div class="text_info clearfix"><span>资费说明：</span></div>
                <div class="input_info_high">
                    <textarea class="width300 height70 readonly" readonly id="descr"></textarea>
                </div>  
                <!--操作按钮-->
                <div class="button_info clearfix">
                    <input type="button" value="返回" class="btn_save" onclick="location.href='/servicelist';"/>
                </div>
            </form>
        </div>
        <!--主要区域结束-->
        <div id="footer">
            <span>[源自北美的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</span>
            <br />
             <span>版权所有(C)云科技有限公司 </span>
        </div>
        <script src="../../js/jquery-3.2.1.js"></script>
        <script src="../../js/GetQueryString.js"></script>
        <script src="../../js/parseDate.js"></script>
        <script>
            var serviceId = GetQueryString('serviceId');
            $.ajax({
                url: "/selectByServiceId",
                type: "post",
                data: {
                    serviceId: serviceId
                },
                success: function (data) {
                    for (var i in data) {
                        var service = data[i];
                        for (var j in service.aList) {
                            var aList = service.aList[j];
                            var accountId = aList.accountId;
                            var realName = aList.realName;
                            var idcardNo = aList.idcardNo;
                        }
                        for (var k in service.cList) {
                            var cList = service.cList[k];
                            var costId = cList.costId;
                            var name = cList.name;
                            var descr = cList.descr;
                        }
                        var unixHost = service.unixHost;
                        var osUsername = service.osUsername;
                        var create = service.createDate;
                        var createDate = getLocalTime(create);
                        var status = service.status;
                        var statu = null;
                        if (status == 0) {
                            statu = "开通";
                            $("#serviceId").val('' + serviceId + '');
                            $("#accountId").val('' + accountId + '');
                            $("#realName").val('' + realName + '');
                            $("#idcardNo").val('' + idcardNo + '');
                            $("#unixHost").val('' + unixHost + '');
                            $("#osUsername").val('' + osUsername + '');
                            $("#statu").append("<option>" + statu + "</option>");
                            $("#createDate").val('' + createDate + '');
                            $("#costId").val('' + costId + '');
                            $("#name").val('' + name + '');
                            $("#descr").text('' + descr + '');
                        } else if (status == 1) {
                            statu = "暂停";
                            $("#serviceId").val('' + serviceId + '');
                            $("#accountId").val('' + accountId + '');
                            $("#realName").val('' + realName + '');
                            $("#idcardNo").val('' + idcardNo + '');
                            $("#unixHost").val('' + unixHost + '');
                            $("#osUsername").val('' + osUsername + '');
                            $("#statu").append("<option>" + statu + "</option>");
                            $("#createDate").val('' + createDate + '');
                            $("#costId").val('' + costId + '');
                            $("#name").val('' + name + '');
                            $("#descr").text('' + descr + '');
                        } else {
                            statu = "删除";
                            $("#serviceId").val('' + serviceId + '');
                            $("#accountId").val('' + accountId + '');
                            $("#realName").val('' + realName + '');
                            $("#idcardNo").val('' + idcardNo + '');
                            $("#unixHost").val('' + unixHost + '');
                            $("#osUsername").val('' + osUsername + '');
                            $("#statu").append("<option>" + statu + "</option>");
                            $("#createDate").val('' + createDate + '');
                            $("#costId").val('' + costId + '');
                            $("#name").val('' + name + '');
                            $("#descr").text('' + descr + '');
                        }


                    }
                }
            });
        </script>
    </body>
</html>
